<!-- 商品ID  商品标题  商品分类  价格  库存 0 颜色 尺码   商品图片   商品详情   浏览量  收藏  分享 状态 -->
@extends('layout.admin')

@section('content')

<script type="text/javascript" charset="utf-8" src="/admins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/admins/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/admins/ueditor/lang/zh-cn/zh-cn.js"></script>

<style>
  .color input,.size input{
   font-size: 14px;
   margin-left: 20px;

  }
  .control-label{
    font-weight:bold;
    font-size:16px;
    color:#aaa;
  }
</style>
  
  <div class="clearfix"></div>
  <div class="col-md-10 " >
  <div class="panel-head"><strong class="icon-reorder"> 商品详情 <a href="/admin/goods/manage"><button class='btn btn-info' style='float:right'>返回列表</button></a></strong></div>
        <!-- 商品标题 -->
        <div class="form-group" style='margin-bottom:40px;margin-top:30px'>
          <label class="col-md-2 control-label">商品标题</label>
          <div class="col-sm-10">
              <input type="text" name='title' class="form-control" value="{{$res->title}}" disabled>
          </div>
        </div>
        <!-- 价格 -->
        <div class="form-group" style='margin-bottom:40px;'>
          <label class="col-sm-2 control-label">价&nbsp;&nbsp;  &nbsp;&nbsp; 格</label>
          <div class="col-sm-2">
              <input type="text" name='price' class="form-control" value="{{$res->price}}" disabled>
          </div>
        </div>
        <!-- 库存 -->
        <div class="form-group" style='margin-bottom:50px'>
          <label class="col-sm-2 control-label">库&nbsp;&nbsp;  &nbsp;&nbsp; 存</label>
          <div class="col-sm-10">
              <input type="text" name='kucun' class="form-control"  value="{{$res->kucun}}" disabled>
          </div>
        </div>
        <!-- 颜色 -->
        <div class="form-group" style='margin-bottom:40px;margin-left:-14px'>
            
            <div class="col-sm-10 color">
                <label class="col-sm-2 control-label">颜&nbsp;&nbsp;  &nbsp;&nbsp; 色</label>
                
                    <input type="checkbox" name='color[]' disabled value='红色' style='margin-left:40px' @foreach($res->color as $k=>$v) @if($v=='红色')  checked @endif  @endforeach >红色
                    <input type="checkbox" name='color[]' disabled value='蓝色' @foreach($res->color as $k=>$v) @if($v=='蓝色')  checked @endif  @endforeach>蓝色
                    <input type="checkbox" name='color[]' disabled value='黑色' @foreach($res->color as $k=>$v) @if($v=='黑色')  checked @endif  @endforeach>黑色
                    <input type="checkbox" name='color[]' disabled value='灰色' @foreach($res->color as $k=>$v) @if($v=='灰色')  checked @endif  @endforeach>灰色
                    <input type="checkbox" name='color[]' disabled value='白色' @foreach($res->color as $k=>$v) @if($v=='白色')  checked @endif  @endforeach>白色      
            </div>
        </div>
        <!-- 尺码 -->
        <div class="form-group" style='margin-bottom:50px;margin-left:-14px'>
            
            <div class="col-sm-10 size">
              <label class="col-sm-2 control-label">尺&nbsp;&nbsp;  &nbsp;&nbsp; 码</label>
            
                  <input type="checkbox" name='size[]' style='margin-left:40px' disabled value='S' @foreach($res->size as $k=>$v) @if($v == 'S') checked @endif @endforeach>S
                  <input type="checkbox" name='size[]' disabled value='M' @foreach($res->size as $k=>$v) @if($v == 'M') checked @endif @endforeach>M
                  <input type="checkbox" name='size[]' disabled value='L' @foreach($res->size as $k=>$v) @if($v == 'L') checked @endif @endforeach>L
                  <input type="checkbox" name='size[]' disabled value='XL' @foreach($res->size as $k=>$v) @if($v == 'XL') checked @endif @endforeach>XL
                  <input type="checkbox" name='size[]' disabled value='XXL' @foreach($res->size as $k=>$v) @if($v =='XLL') checked @endif @endforeach>XLL
            </div>
        </div>

            <!-- 商品图片 -->
            <div class="form-group" style='margin-bottom:50px'>
              <label  class="col-sm-2 control-label">商品图片</label>
                  <ul class='list-unnstyled list-inlilne' style='margin-left:40px'>

                    @foreach($path as $k=>$v)
                    <li ><img src="{{$v->path}}" height='50px' alt="" style="float:left;"></li>
                    @endforeach
                  </ul>
            </div>
            <!-- 修改图片 -->
         <!--    <div class="form-group" style='margin-bottom:20px'>
                <label for="exampleInputFile"  class="col-sm-2 control-label">商品图片</label>
                    <div  heiht='300px' width='500px'>
                      @foreach($path as $k=>$v)
                      <img src="{{$v->path}}" height='50px' alt="" style="float:left;">
                      @endforeach
              
                    <a href="/admin/goods/delP"> <div class='btn btn-info'>删除旧图</div></a>
                     </div>
              
                    <input type="file" name='path' style="float:left;" id="exampleInputFile">
            </div> -->
        
            <!-- 分类标题 -->
            <div class="form-group " style='margin-bottom:50px'>
              <label class="col-sm-2 control-label">分类标题</label>
              <div class="col-sm-10">

                  <select name="cate_id" class="input w70" placeholder="选择服装分类">
                   @foreach($cates as $k=>$v)
                    <option value="{{$v->id}}" disabled @if($res->cate_id == $v->id) selected @endif>{{$v->name}}</option>
                   @endforeach
                   
                </select>
              </div>
            </div>

            <!-- 状态 -->
            <div class="form-group" style='margin-bottom:30px'>
              <label class="col-sm-2 control-label">状&nbsp;&nbsp;  &nbsp;&nbsp; 态</label>
              <div style='margin-top:8px '>
                  <label><input type="radio" name='status' disabled value='1' @if($res->status == 1) checked @endif>上架</label> &nbsp;&nbsp; 
                  <label><input type="radio" name='status'  disabled value='0' @if($res->status == 0) checked @endif>下架</label>
              </div>
            </div>
            <!-- 浏览量 -->
            <div class="form-group" style='margin-bottom:40px'>
              <label class="col-sm-2 control-label">已浏览量</label>
              <div class="col-sm-10">
                  <input type="text" name='kucun' disabled class="form-control"  value="{{$res->views}}">
              </div>
            </div>
            <!-- 收藏 -->
            <div class="form-group" style='margin-bottom:20px'>
              <label class="col-sm-2 control-label">是否收藏</label>
              <div>
                  <label ><input type="radio" name='collection' disabled value='1' @if($res->collection == 1) checked @endif>是</label> &nbsp;&nbsp; 
                  <label ><input type="radio" name='collection' disabled value='0' @if($res->collection == 0) checked @endif>否</label>
              </div>
            </div>
            <!-- 分享 -->
            <div class="form-group" style='margin-bottom:20px'>
              <label class="col-sm-2 control-label">是否被分享</label>
              <div>
                  <label ><input type="radio" name='share' disabled value='1' @if($res->share == 1) checked @endif>是</label> &nbsp;&nbsp; 
                  <label ><input type="radio" name='share' disabled value='0' @if($res->share == 0) checked @endif>否</label>
              </div>
            </div>
            <!-- 详情 -->
            <div class="form-group" style='margin-bottom:40px'>
              <label class="col-sm-2 control-label">商品详情</label>
              <div class="col-sm-10">
                  <script id="editor" name="detail" type="text/plain" disabled style='width:800px;height:500px' value=''>{!!$res->detail!!}</script>
              <div class="mws-button-row" style='margin-left:300px'>
                  {{csrf_field()}}
              </div>
            </div>
  </div>
<script type="text/javascript">
    var ue = UE.getEditor('editor');
</script>

@endsection



